package org.example.handler;import com.google.protobuf.Any;import io.netty.channel.ChannelHandlerAdapter;import io.netty.channel.ChannelHandlerContext;import io.netty.channel.ChannelInboundHandlerAdapter;import org.example.serialize.proto.GenerateMessage;import java.util.Random;public class ProtobufHandler extends ChannelInboundHandlerAdapter {    @Override    public void channelRead(ChannelHandlerContext ctx, Object meg) throws Exception {        // 读取数据        GenerateMessage.Entity message = (GenerateMessage.Entity) meg;        System.out.println(message);        // 写回数据        ctx.writeAndFlush(GenerateMessage.Entity.newBuilder().addStrings("==============="));    }    @Override    public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {        cause.printStackTrace();        ctx.close();    }}